//
//  WBJPUSHSDKHelper.h
//  Pods-WBJPUSHSDKHelper_Example
//
//  Created by Mr_Lucky on 2018/9/10.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <AdSupport/AdSupport.h>
#import "JPUSHService.h"

#ifdef NSFoundationVersionNumber_iOS_9_x_Max
#import <UserNotifications/UserNotifications.h>
#endif

#ifdef DEBUG
static BOOL const WB_JPush_Producation = NO;
#else
static BOOL const WB_JPush_Producation = YES;
#endif

@protocol WBJPUSHSDKHelperDelegate <NSObject>

- (void)jpushDidReceiveMessage:(NSNotification *)notificaton;

@end

@interface WBJPUSHSDKHelper : NSObject

/**
 实例类

 @return WBJPUSHSDKHelper
 */
+ (instancetype)shareHelper;

@property (nonatomic, assign) id<WBJPUSHSDKHelperDelegate> delegate;

/**
 注册方法

 @param entity 注册实体类 传nil时默认：JPAuthorizationOptionAlert|JPAuthorizationOptionBadge|JPAuthorizationOptionSound 可选
 @param appKey 一个JPush 应用必须的,唯一的标识. 请参考 JPush 相关说明文档来获取这个标识 必传
 @param channel 发布渠道. 可选
 @param delegate 注册代理
 @param launchingOption 启动信息
 @param IDFAEnabled 广告标识符（IDFA） 如果不需要使用IDFA，传nil
 */
- (void)wb_registerJPUSHWithEntity:(JPUSHRegisterEntity *)entity
                            appkey:(NSString *)appKey
                           channel:(NSString *)channel
                   launchingOption:(NSDictionary *)launchingOption
                          delegate:(id<JPUSHRegisterDelegate>)delegate
                       IDFAEnabled:(BOOL)IDFAEnabled;


/**
JPush标识此设备的 registrationID

 @param completionHandler callback
 */
- (void)wb_registrationIDCompletionHandler:(void (^) (int resCode, NSString *registrationID))completionHandler;

/**
 清除通知图标
 */
- (void)clearNotificationBadge:(UIApplication *)application;

@end
